package de.reichelt.fxrequi.data;

import javafx.beans.property.IntegerProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleObjectProperty;

public class UserRole {
  private final IntegerProperty id = new SimpleIntegerProperty();
  private final ObjectProperty<Project> project = new SimpleObjectProperty<>();
  private final ObjectProperty<Role> role = new SimpleObjectProperty<>();
  private final ObjectProperty<User> user = new ReadOnlyObjectWrapper<>();

  public UserRole() {
  }

  public UserRole(Integer id, Project project, User user, Role role) {
    setId(id);
    setProject(project);
    setUser(user);
    setRole(role);
  }

  public User getUser() {
    return user.get();
  }

  public void setUser(User value) {
    user.set(value);
  }

  public ObjectProperty userProperty() {
    return user;
  }
  
  public int getId() {
    return id.get();
  }

  public void setId(int value) {
    id.set(value);
  }

  public IntegerProperty idProperty() {
    return id;
  }
  
  public Project getProject() {
    return project.get();
  }

  public void setProject(Project value) {
    project.set(value);
  }

  public ObjectProperty projectProperty() {
    return project;
  }
  
  public Role getRole() {
    return role.get();
  }

  public void setRole(Role value) {
    role.set(value);
  }

  public ObjectProperty roleProperty() {
    return role;
  }

  
}
